<!-- 搜索框 -->
<template>
  <el-select v-model="value" filterable placeholder="请选择">
    <el-option
      v-for="item in data"
      :key="item.id"
      :label="item.name"
      :value="item.id"
    >
    </el-option>
  </el-select>
</template>

<script>
import { ajax } from "@/mock/ajax";
import { data } from "@/mock/mockData";
ajax.initTable(data);

export default {
  name: "SearchComp",
  components: {},
  data() {
    return {
      value: "",
    };
  },
  created() {
    ajax.getAll().then((res) => {
      this.data = res;
      // this.states = res;
      console.log(res);
      // console.log(this.states);
    });
  },
};
</script>

<style scoped lang="scss"></style>
